﻿//
//  Copyright (c) 2011 Extreme: Paweł Huryn (lead), Jakub Domański
//

using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace Extreme.SPFramework.Configuration
{
    /// <summary>
    /// Application configuration base
    /// </summary>
    [Serializable]
    public class AppConfigurationSection
    {
        [XmlIgnore]
        public TimeSpan DefaultCacheTimeSpan
        {
            get { return TimeSpan.Parse(DefaultCacheTimeSpanString); }
        }

        public String DefaultCacheTimeSpanString { get; set; }

        /// <summary>
        /// Entity mappings
        /// </summary>
        [XmlElement("EntityMapping")]
        public List<XmlEntityMappingConfiguration> Mappings { get; set; }
    }
}
